#pragma once

#include "../Core/Vector.h"
#include "DrawAutomaticUniform.h"
#include "Uniform.h"
#include "Context.h"
#include "DrawCommand.h"
#include "SceneState.h"

using namespace Core;

namespace Renderer
{
	class ModelViewMatrixUniform : public DrawAutomaticUniform
	{
	public:
		ModelViewMatrixUniform(Uniform* uniform)
		{
			_uniform = (TemplateUniform<Matrix4F>*)uniform;
		}

		void Set(Context* context, DrawCommand* drawCommand, SceneState* sceneState)
		{
			_uniform->SetValue(Matrix4F(sceneState->ModelViewMatrix()));
		}

	private:
		TemplateUniform<Matrix4F>* _uniform;
	};
}